import Vue from 'vue'
import Vueresource from 'vue-resource'
import Router from 'vue-router'

import Login from "../components/Login";
import Main from "../components/Main";
import Tool from "../components/Tool";
import My from "../components/My";
import FooterBar from "../components/FooterBar";
import Home from "../components/Home";
import Register from "../components/Register";
import Person from "../components/Person";
import Words from "../components/Words";
import Word  from "../components/Word";
Vue.use(Router)
Vue.use(Vueresource)
export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/login'
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path:'/main',
      component:Main,
      meta:{
        requireAuth:true
      }
    },
    {
      path:'/my',
      component:My,
      meta:{
        requireAuth:true
      }
    },
    {
      path:'/footerbar',
      component:FooterBar,
      meta:{
        requireAuth:true
      }
    },
    {
      path:'/tool',
      component:Tool,
      meta:{
        requireAuth:true
      }
    },
    {
      path:'/home',
      component:Home,
      meta:{
        requireAuth:true
      }
    },
    {
      path:'/register',
      component:Register
    },
    {
      path:'/person',
      component:Person,
      meta:{
        requireAuth:true
      }
    },
    {
      path:'/words',
      component:Words,
      meta:{
        requireAuth:true
      }
    },
    {
      path:'/word',
      name:'word',
      component:Word,
      meta:{
        requireAuth:true
      }
    }
  ]
})
